package com.grom.service;

import java.util.List;

import com.grom.dao.DatabaseDao;
import com.grom.po.ContactInfo;
import com.holder.DBContextHolder;
import com.holder.DBUTil;

public interface ContactInfoService {
	ContactInfoService instance = new ContactInfoService() {

		public List<ContactInfo> getContactInfoByReId(String reId) {
			DBContextHolder.setContextConnection(DatabaseDao.getConnection());
			String sql = "select * from contactinfo where relatedid = '" + reId + "'";
			return DBUTil.getResult(sql, ContactInfo.class);
		}

		public void deleteByReId(String reId) {
			String sql = "delete from contactinfo where relatedid = '" + reId + "'";
			DBUTil.update(sql);
		}

	};

	List<ContactInfo> getContactInfoByReId(String reId);

	void deleteByReId(String reId);
}
